{layout '../Layout/layout.latte'}
{block private_css}
    <style>
        .content{
            max-width:750px;
            background:url({path('[MobileConsoles]/img/share.png')}) no-repeat;
            background-size:100% 100%;
            overflow:hidden;
        }

        .xiangshu{
            position:absolute;
            left:50%;
            transform:translateX(-50%);
            top:13%;
        }

        .xiangshu > img{
            width:100%;
            height:100%;
        }

        .sContent{
            width:100%;
            text-align:center;
            line-height:32px;
            font-size:18px;
            color:#fff;
            letter-spacing:3px;
            position:relative;
            top:60%;
        }

        .sContent-bottom{
            width:100%;
            max-width:750px;
            text-align:center;
            font-size:12px;
            color:#a3cffe;
            letter-spacing:0px;
            position:fixed;
            bottom:48px;
        }

        .bottom{
            display:block;
            max-width:750px;
            width:100%;
            height:45px;
            color:#fff;
            line-height:45px;
            font-size:16px;
            text-align:center;
            position:fixed;
            bottom:0;
        }

    </style>
{/block}

{block private_js}
    <script type="text/javascript">
        $(function () {
            var height = $('.sContent .height').height();
            if (height >= 100) {
                height = $('.sContent .height').height() - 72;
            } else {
                height = $('.sContent .height').height()
            }
            $('.sContent .height').css('height', height);

            $('#detailBtn').click(function(){
                var that = $(this);
                var url = that.attr('href');
                var gobackurl = that.attr('data-gobackurl');
                var shareid = that.attr('data-shareid');

                $.ajax({
                    type: "post",
                    url: url,
                    data: {
                        gobackurl: gobackurl,
                        shareid: shareid
                    },
                    cache: false,
                    dataType: "json",
                    success: function (data) {
                        if (data.status == "n") {
                            $.toast("获取任务详情失败");
                            return false;
                        } else {
                            location.replace(data.url)
                            // console.log(data.url)
                        }
                    }
                });
                return false;
            })
        })
    </script>
{/block}

{block content}
    <div class="xiangshu user-info">
        <img src="{path('[MobileConsoles]/img/xiangshuyun-logo.png')}">
    </div>
    {if $curShare}
        <div class="sContent" style="top:52%">
            {*<div>{$user['fullName']}为[{$lists}]申请积分事项</div>*}
            {*<div>积分事项</div>*}
            {*<div style="color:#fce700">申请事项：[{$sNames['names']}]</div>*}
            {*{if $acornA['memo']}*}
                {*<div class="height" style="font-size:12px;padding:0 24px;overflow-y:scroll;margin-top:10px;height:auto;line-height:14px;">{$acornA['memo']}</div>*}
            {*{/if}*}
            {*<span style="color:#fce700">{$acornA['acorn']}</span>分!*}
            <div>{$curShare['content1']}</div>
            <div style="color:#fce700">{$curShare['content2']}</div>
            {if $curShare['content3']}
            <div class="height" style="font-size:12px;padding:0 24px;overflow-y:scroll;margin-top:10px;height:auto;line-height:14px;">{$curShare['content3']|noescape}</div>
            {/if}
        </div>
    {else}
        <div class="sContent">
            <div>该申请事项错误</div>
        </div>
    {/if}
    {*{if !$userid}*}
        {*<div class="sContent-bottom">*积极申请积分，善于发现别人的优点，记录自己成长的过程!</div>*}
        {*<a class="bottom" style="background:#fd793b;" href="{url('mobileConsoles_login')}">*}
            {*{$curShare['operate']}*}
        {*</a>*}
    {*{else}*}
        {*<div class="sContent-bottom">*积极申请积分，善于发现别人的优点，记录自己成长的过程!</div>*}
        {*<a class="bottom" style="background:#ff9932;" href="{$curShare['gobackUrl']}">*}
            {*{$curShare['operate']}*}
        {*</a>*}
    {*{/if}*}

    <div class="sContent-bottom">*积极申请积分，善于发现别人的优点，记录自己成长的过程!</div>
    <a id="detailBtn" class="bottom" style="background:#ff9932;" href="{url('consoles_share_shareDetail')}" data-gobackurl="{$gobackUrl}" data-shareid="{$curShare['id']}">
        {$curShare['operate']}
    </a>
{/block}